package mww.javabean.service;


import mww.common.DaoException;
import mww.common.ServiceException;
import mww.javabean.dao.AdminDaoImpl;
import mww.javabean.entity.Admin;

public class AdminServiceImpl implements AdminService {
	
	//管理员登录验证方法
	@Override
	public Admin adminLogin(String loginName,String password) throws ServiceException{
		Admin admin=null;
		try{
			admin = new AdminDaoImpl().findAdminByLoginName(loginName);
		}catch (DaoException e) {
			e.printStackTrace();
			throw new DaoException(e.getMessage(),e);
		}
		return admin;
	}

}
